package cn.wubo.jdbc.service.impl;

import cn.wubo.jdbc.dao.IDemoTableDao;
import cn.wubo.jdbc.entity.DemoTable;
import cn.wubo.jdbc.service.IDemoTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DemoTableServiceImpl implements IDemoTableService {
    @Autowired
    IDemoTableDao demoTableDao;

    @Override
    public int add(DemoTable demoTable) {
        return demoTableDao.add(demoTable);
    }

    @Override
    public int update(DemoTable demoTable) {
        return demoTableDao.update(demoTable);
    }

    @Override
    public int delete(int id) {
        return demoTableDao.delete(id);
    }

    @Override
    public DemoTable getById(int id) {
        return demoTableDao.getById(id);
    }

    @Override
    public List<DemoTable> getAllList() {
        return demoTableDao.getAllList();
    }
}
